*&---------------------------------------------------------------------*
*& 包含               ZFI001TOP
*&---------------------------------------------------------------------*
TABLES:bkpf,cepc.
TYPE-POOLS:abap, slis, icon.
TABLES: sscrfields.


CONSTANTS:gc_ergsl_left  TYPE rf011p-ergsl       VALUE '67', "左边顶层项次
          gc_ergsl_right TYPE rf011p-ergsl       VALUE '135', "右边顶层项目
          gc_blank       TYPE char2              VALUE '　'.
*----------------------------------------------------------------------*
* TYPES
*----------------------------------------------------------------------*
TYPES: BEGIN OF gty_data,
         prkey TYPE rf011p-prkey,
         ergsl TYPE rf011p-ergsl,
         summe TYPE rf011p-summe,
         stufe TYPE rf011p-stufe,
         setnr TYPE rf011s-setnr,
         txt45 TYPE rf011q-txt45,
         zztop TYPE rf011p-ergsl,
         zzzup TYPE rf011p-ergsl,
         zzzxc TYPE rf011p-ergsl,
         zzdel TYPE char1,
         cost1 TYPE fins_vtcur12, "上年同期数
         "cost9 TYPE fins_vtcur12, "上年年初数
         cost2 TYPE fins_vtcur12, "上月期末数
         cost3 TYPE fins_vtcur12, "年初数
         cost4 TYPE fins_vtcur12, "期末数
         cost5 TYPE fins_vtcur12, "调整年初数
         cost6 TYPE fins_vtcur12, "调整期末数
         cost7 TYPE fins_vtcur12, "调整后年初数
         cost8 TYPE fins_vtcur12, "调整后期末数
       END OF gty_data.

TYPES: BEGIN OF gty_list,
         zzzxca TYPE rf011p-ergsl,
         txt45a TYPE rf011q-txt45,
         cost1a TYPE fins_vtcur12,
         cost2a TYPE fins_vtcur12,
         cost3a TYPE fins_vtcur12,
         cost4a TYPE fins_vtcur12,
         cost5a TYPE fins_vtcur12,
         cost6a TYPE fins_vtcur12,
         cost7a TYPE fins_vtcur12,
         cost8a TYPE fins_vtcur12,
         zzzxcb TYPE rf011p-ergsl,
         txt45b TYPE rf011q-txt45,
         cost1b TYPE fins_vtcur12,
         cost2b TYPE fins_vtcur12,
         cost3b TYPE fins_vtcur12,
         cost4b TYPE fins_vtcur12,
         cost5b TYPE fins_vtcur12,
         cost6b TYPE fins_vtcur12,
         cost7b TYPE fins_vtcur12,
         cost8b TYPE fins_vtcur12,
       END OF gty_list.

DATA: gv_p68_adj01 TYPE fins_vtcur12, "年初
      gv_p68_adj02 TYPE fins_vtcur12. "期末
TYPES: BEGIN OF gty_faglflext,
         ryear   TYPE faglflext-ryear,
         objnr00 TYPE faglflext-objnr00,
         objnr01 TYPE faglflext-objnr01,
         objnr02 TYPE faglflext-objnr02,
         objnr03 TYPE faglflext-objnr03,
         objnr04 TYPE faglflext-objnr04,
         objnr05 TYPE faglflext-objnr05,
         objnr06 TYPE faglflext-objnr06,
         objnr07 TYPE faglflext-objnr07,
         objnr08 TYPE faglflext-objnr08,
         drcrk   TYPE faglflext-drcrk,
         rpmax   TYPE faglflext-rpmax,
         racct   TYPE faglflext-racct,
         hslvt   TYPE faglflext-hslvt,
         hsl01   TYPE faglflext-hsl01,
         hsl02   TYPE faglflext-hsl02,
         hsl03   TYPE faglflext-hsl03,
         hsl04   TYPE faglflext-hsl04,
         hsl05   TYPE faglflext-hsl05,
         hsl06   TYPE faglflext-hsl06,
         hsl07   TYPE faglflext-hsl07,
         hsl08   TYPE faglflext-hsl08,
         hsl09   TYPE faglflext-hsl09,
         hsl10   TYPE faglflext-hsl10,
         hsl11   TYPE faglflext-hsl11,
         hsl12   TYPE faglflext-hsl12,
         hsl13   TYPE faglflext-hsl13,
         hsl14   TYPE faglflext-hsl14,
         hsl15   TYPE faglflext-hsl15,
         hsl16   TYPE faglflext-hsl16,
         cost1   TYPE fins_vtcur12, "上年同期数
         cost2   TYPE fins_vtcur12, "上月期末数
         cost3   TYPE fins_vtcur12, "年初数
         cost4   TYPE fins_vtcur12, "期末数
       END OF gty_faglflext.

TYPES: BEGIN OF gty_racct,
         ryear TYPE faglflext-ryear,
         drcrk TYPE faglflext-drcrk,
         racct TYPE faglflext-racct,
         cost1 TYPE fins_vtcur12, "上年同期数
         cost2 TYPE fins_vtcur12, "上月期末数
         cost3 TYPE fins_vtcur12, "年初数
         cost4 TYPE fins_vtcur12, "期末数
       END OF gty_racct.
*-----------------------------------------------------------------------
* DATA
*-----------------------------------------------------------------------
DATA:gt_x011q TYPE rf011q         OCCURS 0 WITH HEADER LINE,
     gt_i011z TYPE rf011z         OCCURS 0 WITH HEADER LINE,
     gt_x011p TYPE rf011p         OCCURS 0 WITH HEADER LINE,
     gt_x011s TYPE rf011s         OCCURS 0 WITH HEADER LINE,
     gt_racct TYPE gty_racct      OCCURS 0 WITH HEADER LINE,
     gt_data  TYPE gty_data       OCCURS 0 WITH HEADER LINE,
     gt_list  TYPE gty_list       OCCURS 0 WITH HEADER LINE.
DATA:gs_repid    TYPE sy-repid,
     gs_fieldcat TYPE lvc_t_fcat,
     gs_layout   TYPE lvc_s_layo,
     gs_sortinfo TYPE lvc_t_sort.
DATA:gv_up_year TYPE bkpf-gjahr,
     gv_butxt   TYPE t001-butxt,
     gv_zdate   TYPE sy-datum,
     gv_danwei  TYPE char2.
DATA: gt_bukrs TYPE TABLE OF t001,
      gs_bukrs TYPE t001.
DATA: p_rb_01 TYPE c VALUE 'X',
      p_rb_02 TYPE c,
      p_rb_03 TYPE c.
*-----------------------------------------------------------------------
*SELECTION SCREEN
*-----------------------------------------------------------------------
SELECTION-SCREEN BEGIN OF BLOCK b01 WITH FRAME.


  SELECT-OPTIONS: s_bukrs FOR bkpf-bukrs NO-EXTENSION NO INTERVALS.
  PARAMETERS: p_gjahr TYPE bkpf-gjahr,
              p_monat TYPE bkpf-monat,
              p_versn TYPE t011-versn.

SELECTION-SCREEN END OF BLOCK b01.
SELECTION-SCREEN: FUNCTION KEY 1 .